package com.free.framework.lib.utils;

import android.text.TextUtils;

import java.util.Locale;

/**
 * @author 李博
 * @date 2016年11月01日
 * @desc
 */
public class SysInfo {

    public static String getMobileModel() {
        String version = android.os.Build.MODEL;
        if (!TextUtils.isEmpty(version)) {
            return version.replace(" ", "_");
        } else {
            return "unknown";
        }
    }


    public static String getSDKVersion() {
        String version = android.os.Build.VERSION.SDK;
        if (!TextUtils.isEmpty(version)) {
            return version;
        } else {
            return "unknown";
        }
    }

    public static String getLanguage() {
        String language = Locale.getDefault().getLanguage();
        String countory = Locale.getDefault().getCountry();
        String finalLanguage = language + '_' + countory;
        return finalLanguage;
    }


}
